# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-flask-compress
_pkgorig=Flask-Compress
pkgver=1.14
pkgrel=1
pkgdesc="Compress responses of your Flask application"
url="https://github.com/colour-science/flask-compress"
arch="noarch"
license="MIT"
depends="python3 py3-brotli py3-flask"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/F/Flask-Compress/Flask-Compress-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
7f30f64bddeaa06875725b6195348cdfb20d3fdd0d8a392f0fbeb209ad5a532bd222fc1c9ceadf7dcff614f2513a885724bfc165fccf162c889924e3b73bee3c  py3-flask-compress-1.14.tar.gz
"
